package com.turing.merchant.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import result.Result;

@FeignClient("mission-server")
public interface MissionService {

    @GetMapping("/mission/mi/miList")
    Result miList(@RequestHeader("Authorization") String token,
            @RequestParam(value = "startTime", required = false) String startTime,
            @RequestParam(value = "endTime", required = false) String endTime,
            @RequestParam(value = "merchantName", required = false) String merchantName,
            @RequestParam(value = "longitude", required = false) String longitude,
            @RequestParam(value = "latitude", required = false) String latitude,
            @RequestParam(value = "cityId", required = false) String cityId,
            @RequestParam(value = "merchantId", required = false) String merchantId,
            @RequestParam(value = "mtId", required = false) String mtId,
            @RequestParam(value = "sortType", required = false,defaultValue = "-1") Integer sortType,
            @RequestParam(value = "pageNum", required = false) Integer pageNum,
            @RequestParam(value = "orderType") Integer orderType,
            @RequestParam(value = "pageSize", required = false) Integer pageSize
    );

    @PostMapping("/mission/myMission/myMissionSave")
    Result myMissionSave(@RequestHeader("Authorization") String token,@RequestBody JSONObject jsonObject);

    @GetMapping("/mission/myMission/myMissionList")
    Result myMissionList(@RequestHeader("Authorization") String token,
            @RequestParam(value = "mtId", required = false) String mtId,
            @RequestParam(value = "missonId", required = false) String missonId,
            @RequestParam(value = "sortType",required = false) Integer sortType,
            @RequestParam(value = "orderType") Integer orderType,
            @RequestParam(value = "pageNum",required = false) Integer pageNum,
            @RequestParam(value = "pageSize",required = false) Integer pageSize
    );
}
